#ifndef CHARACTERSPECIALSFORM_H
#define CHARACTERSPECIALSFORM_H


#include "specialtablemodel.h"
#include "specialsselectmodel.h"


#include <campaign.h>


#include <QWidget>
#include <QSortFilterProxyModel>
#include <QButtonGroup>


namespace Ui {
class CharacterSpecialsForm;
}

class CharacterSpecialsForm : public QWidget
{
    Q_OBJECT
    
public:

    explicit CharacterSpecialsForm(QWidget *parent = 0);
    ~CharacterSpecialsForm();

    void setCampaign(Campaign* campaign);

    void addSpecialAbility();
    void removeSpecialAbility();

    void refresh();

protected slots:

    void onSectionChanged();
    void onSpecialChanged();
    void onCheckBoxClicked(int id);

protected:

    virtual void showEvent(QShowEvent *e);


private slots:

    void on_tabWidget_currentChanged(int index);


private:

    Ui::CharacterSpecialsForm *ui;

    SpecialTableModel* m_specialTable;
    SpecialsSelectModel* m_specialsSelect;

    QSortFilterProxyModel* m_sortFilter;


    QButtonGroup* m_checkboxes;


};

#endif // CHARACTERSPECIALSFORM_H
